home *** CD-ROM | disk | FTP | other *** search
-
- // guimenu.cpp
- //
- // Copyright (c) 1995 by Toshiaki Tsuji, all rights reserved.
-
- #include "stdgfx.h"
- #include "guimenu.h"
-
- GUIMENU::GUIMENU () : GUIOBJECT ()
- {
- hMenu = NULL;
- } // End of Constructor for GUIMENU
-
- GUIMENU::~GUIMENU ()
- {
- #if defined (__FORWINDOWS__)
- if (hMenu!=NULL)
- DestroyMenu ( hMenu );
- #endif
- } // End of Destructor for GUIMENU
-
- BOOLEAN GUIMENU::Load ( STRING Name )
- {
- #if defined (__FORWINDOWS__)
- if (hMenu!=NULL)
- DestroyMenu ( hMenu );
-
- hMenu = LoadMenu ( hInstance, Name );
- if (hMenu==NULL)
- return FAILURE;
- return SUCCESS;
- #else
- if (Name)
- {}
- return SUCCESS;
- #endif
- } // End of Load for GUIMENU
-
- VOID GUIMENU::SetItemState ( LONG CommandID, LONG State )
- {
- if (CommandID&State)
- {}
- #if defined (__FORWINDOWS__)
- #if defined (__FORWIN386__)
- EnableMenuItem ( hMenu, (short)CommandID, (short)(State|MF_BYCOMMAND) );
- #else
- EnableMenuItem ( hMenu, CommandID, State | MF_BYCOMMAND );
- #endif
- #elif defined (__FOROS2__)
- #elif defined (__FORDOS__)
- #endif
- } // End of SetItemState for GUIMENU
-
-
-